﻿using CLAP;
using Ninject;
using SoldiHive.ContractBindings;
using SoldiHive.Core;

namespace SoldiHive.Console
{
	public class Program
	{
		static void Main(string[] args)
		{
			var targetResolver = new TargetResolver();
			targetResolver.RegisterTargetType<Process>(Program.Resolver);

			Parser.Run(args, targetResolver);
		}

		static Process Resolver()
		{
			var marketViewer = DI.Kernel.Get<IMarketViewer>();
			var printer = DI.Kernel.Get<IPrinter>();

			return new Process(marketViewer, printer);
		}
	}
}
